from digits import nrDigits

def sq2exp((x,y)):
    return (x + 2 * y, x + y)


def solution():
    value = (1,1)
    count = 0
    
    for i in range(1000):
          value = sq2exp(value)  
          if nrDigits(value[0]) > nrDigits(value[1]):
              count += 1
              
    print count
    
from timeit import Timer
print Timer('solution()', 'from __main__ import solution').timeit(1)  
